﻿using System.Collections;
using UnityEngine;
using UnityEngine.UI;

public class UICharacterEquipRender : MonoBehaviour
{
    public enum EquipSlot
    {
        Head = 1,
        Body = 2,
        Hand = 3,
    }

    public Image imgIcon;

    public EquipSlot slot;  

    public void SetData(string v)
    {
        if (string.IsNullOrEmpty(v))
        {
            imgIcon.gameObject.SetActive(false);
        }
        else
        {
            ItemInfo itemInfo = StaticData.GetItemInfo(v);
            imgIcon.sprite = Resources.Load<Sprite>("Icon/" + itemInfo.icon);
            imgIcon.gameObject.SetActive(true);
        }
    }
}
